<template>
  <div class="s">
    <div class="top">
      <div class="title"><span>|</span>当前主治医生</div>
      <div class="doctor">
        <div class="icon">
          <img
            src="https://img.ddtouxiang.com/upload/touxiang/20230331/0331192112181.png_preview.jpg"
            alt=""
          />
        </div>
        <div class="introduce">
          <div>
            <div><span>没毛病</span> 主任医师 教授</div>
            <div style="font-size: 13px">
              儿童神经病学，癫痫病学,儿童发育行为障碍
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="bottom">
      <div class="title"><span>|</span>病情概览</div>
      <div class="options">
        <!-- <div class="option">发作记录</div>
      <div class="option">用药记录</div>
      <div class="option">就诊记录</div> -->
        <van-button
          :class="[selectBtn === 'list1' ? 'active' : 'notActive']"
          class="option"
          @click="btnActive('list1')"
          >发作记录</van-button
        >
        <van-button
          :class="[selectBtn === 'list2' ? 'active' : 'notActive']"
          class="option"
          @click="btnActive('list2')"
          >用药记录</van-button
        >
        <van-button
          :class="[selectBtn === 'list3' ? 'active' : 'notActive']"
          class="option"
          @click="btnActive('list3')"
          >就诊记录</van-button
        >
      </div>
      <div class="chart"><img :src="'../static/chart.png'" alt="" /></div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      selectBtn: ''
    }
  },
  methods: {
    btnActive(target) {
      this.selectBtn = target
    }
  }
}
</script>

<style scoped>
.s {
  height: 80vh;
  background-color: #ebebeb;
}
.top {
  padding-bottom: 20px;
  background-color: white;
}
.title {
  font-size: 18px;
  padding-top: 10px;
  margin-left: 10px;
  border-bottom: 1px solid #eee;
}
.title > span {
  color: blue;
  font-size: 30px;
}
.doctor {
  margin-top: 10px;

  width: 80%;
  margin-left: 10%;
  display: flex;
  justify-content: space-between;
}
.introduce {
  width: 200px;
  word-wrap: break-word;
  font-size: 15px;
}
.introduce span {
  color: blue;
  font-size: 25px;
  font-weight: bold;
}
.icon {
  width: 80px;
  height: 80px;
}
.icon img {
  border-radius: 50%;
}
img {
  width: 100%;
  height: 100%;
}
.bottom {
  margin-top: 10px;
  background-color: white;

}
/*  */
.options {
  display: flex;
  justify-content: space-between;
  padding: 15px;
  /* border-bottom: 1px solid black; */
}

.option {
  width: 33.33%;
  color: #409eff;
  border: none;
  /* background-color: #ffffff; */
}
.active {
  color: white;
  background-color: #409eff;
}
.notActive {
  color: #409eff;
  background-color: white;
}
.chart {
  width: 80%;
  height: 250px;
  margin-left: 10%;
  margin-top: 30px;
  background-color: red;
}
</style>